import psycopg2

# 数据库连接参数
conn = psycopg2.connect(
    dbname='board',
    user='postgres',
    password='1234',
    host='localhost',
    port='5432'
)

# 创建一个游标对象
cur = conn.cursor()